#ifndef CHARTSCENE_H
#define CHARTSCENE_H

#include <qwt.h>
#include <QGraphicsSceneMouseEvent>
#include <QPointF>
#include <QGraphicsLineItem>
#include <QList>
#include <qwt_plot_curve.h>
#include <qwt_plot.h>

class ChartScene : public QwtPlotCurve
{

public:
    explicit ChartScene(QObject *parent = 0);

    void setMaxValues(const qreal& max_x,const qreal& max_y);
    void setMinValues(const qreal& min_x,const qreal&min_y);

    void drawGraph(QwtPlot* plot,const QList<qreal>&,const QList<qreal>&);
    void drawGraph(QwtPlot* plot,const QList<QPointF>& pointList);
signals:

public slots:

private:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);

    qreal maxx,maxy;    //maximal x and y values (price and time)
    qreal minx,miny;    //minimal x and y values
};

#endif // CHARTSCENE_H
